import {
  formatPhoneNum,
  transNum,
  delcommafy,
  returnFloat,
  filterObj,
  deepClone,
} from './js-sdk/tool.js'
import QRCode from './js-sdk/externallibrary/weapp-qrcode.js'
import table from './ui/table/index.vue'
import describe from './ui/describe/index.vue'
const $zcgTool = {
  formatPhoneNum,
  transNum,
  delcommafy,
  returnFloat,
  filterObj,
  deepClone,
  zcgQRCode: QRCode,
}
// 挂载到uni对象
uni.$zcgTool = $zcgTool

const install = (Vue) => {
  Vue.prototype.$zcgTool = $zcgTool
  Vue.component('zcgTable', table)
  Vue.component('zcgDescribe', describe)
}

export default {
  install,
}
